from django.db import models

# Create your models here.

class book(models.Model):
    title = models.CharField(max_length=50)




class user(models.Model):
    py=(
        (1,'正常'),
        (2,'故障'),
    )

    name = models.CharField(max_length=50)
    age = models.IntegerField()
    type=models.ForeignKey(book, on_delete=models.CASCADE)
    status = models.IntegerField( choices=py)


class login(models.Model):
    username = models.CharField(max_length=50)
    password = models.CharField(max_length=50)
